---
id: search
title: "Query all datasets and jobs"
description: "Returns one or more datasets and jobs of your query."
sidebar_label: "Query all datasets and jobs"
hide_title: true
hide_table_of_contents: true
api:
  {
    "operationId": "search",
    "parameters":
      [
        {
          "name": "q",
          "in": "query",
          "schema":
            {
              "type": "string",
              "example": "my-dataset",
              "description": "Query containing pattern to match; datasets and jobs pattern matching is string based and case-insensitive. Use percent sign (`%`) to match any string of zero or more characters (`my-job%`), or an underscore (`_`) to match a single character (`_job_`).",
            },
          "required": true,
        },
        {
          "name": "filter",
          "in": "query",
          "schema":
            {
              "type": "string",
              "example": "dataset",
              "description": "Filters the results of your query by `dataset` or `job`.",
            },
          "required": false,
        },
        {
          "name": "sort",
          "in": "query",
          "schema":
            {
              "type": "string",
              "example": "name",
              "description": "Sorts the results of your query by `name` or `updated_at`.",
            },
          "required": false,
        },
        {
          "name": "limit",
          "in": "query",
          "description": "The number of results to return from offset.",
          "required": false,
          "schema": { "type": "integer", "example": 25, "default": 100 },
        },
        {
          "name": "namespace",
          "in": "query",
          "description": "Match jobs or datasets within the given namespace.",
          "required": false,
          "schema":
            { "type": "string", "maxLength": 1024, "example": "my-namespace" },
        },
        {
          "before": null,
          "name": "before",
          "in": "query",
          "description": "Match jobs or datasets **before** `YYYY-MM-DD`.",
          "required": false,
          "schema":
            {
              "type": "string",
              "pattern": "YYYY-MM-DD",
              "example": "2022-09-15",
            },
        },
        {
          "after": null,
          "name": "after",
          "in": "query",
          "description": "Match jobs or datasets **after** `YYYY-MM-DD`.",
          "required": false,
          "schema":
            {
              "type": "string",
              "pattern": "YYYY-MM-DD",
              "example": "2022-09-15",
            },
        },
      ],
    "description": "Returns one or more datasets and jobs of your query.",
    "tags": ["Search"],
    "responses":
      {
        "200":
          {
            "description": "OK",
            "content":
              {
                "application/json":
                  {
                    "schema":
                      {
                        "type": "object",
                        "properties":
                          {
                            "totalCount":
                              {
                                "description": "Total number of search results.",
                                "type": "integer",
                                "example": 1,
                              },
                            "results":
                              {
                                "type": "array",
                                "items":
                                  {
                                    "type": "object",
                                    "properties":
                                      {
                                        "type":
                                          {
                                            "type": "string",
                                            "enum": ["DATASET", "JOB"],
                                            "description": "The type of search result.",
                                            "example": "DATASET",
                                            "title": "SearchResultType",
                                          },
                                        "name":
                                          {
                                            "type": null,
                                            "description": "The name of the dataset or job.",
                                            "example": "public.delivery_7_days",
                                          },
                                        "updatedAt":
                                          {
                                            "type": null,
                                            "description": "An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the dataset or job was updated.",
                                            "example": "2019-05-09T19:49:24.201361Z",
                                          },
                                        "namespace":
                                          {
                                            "type": "string",
                                            "description": "The namespace of the dataset or job.",
                                            "example": "food_delivery",
                                          },
                                        "nodeId":
                                          {
                                            "type": "string",
                                            "description": "The ID of the node. A node can either be a dataset node or a job node. The format of nodeId for dataset is `dataset:<namespace_of_dataset>:<name_of_the_dataset>` and for job is `job:<namespace_of_the_job>:<name_of_the_job>`.",
                                            "example": "dataset:food_delivery:public.delivery_7_days",
                                          },
                                      },
                                    "title": "SearchResult",
                                  },
                              },
                          },
                        "title": "SearchResultList",
                      },
                  },
              },
          },
      },
    "method": "get",
    "path": "/search",
    "servers":
      [
        {
          "url": "http://localhost:5000/api/v1",
          "description": "Local API server",
        },
      ],
    "info":
      {
        "title": "Marquez",
        "version": "0.50.0",
        "description": "Marquez is an open source **metadata service** for the **collection**, **aggregation**, and **visualization** of a data ecosystem's metadata.",
        "license":
          {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html",
          },
      },
    "postman":
      {
        "name": "Query all datasets and jobs",
        "description":
          {
            "content": "Returns one or more datasets and jobs of your query.",
            "type": "text/plain",
          },
        "url":
          {
            "path": ["search"],
            "host": ["{{baseUrl}}"],
            "query":
              [
                {
                  "disabled": false,
                  "description":
                    { "content": "(Required) ", "type": "text/plain" },
                  "key": "q",
                  "value": "",
                },
                { "disabled": false, "key": "filter", "value": "" },
                { "disabled": false, "key": "sort", "value": "" },
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "The number of results to return from offset.",
                      "type": "text/plain",
                    },
                  "key": "limit",
                  "value": "",
                },
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "Match jobs or datasets within the given namespace.",
                      "type": "text/plain",
                    },
                  "key": "namespace",
                  "value": "",
                },
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "Match jobs or datasets **before** `YYYY-MM-DD`.",
                      "type": "text/plain",
                    },
                  "key": "before",
                  "value": "",
                },
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "Match jobs or datasets **after** `YYYY-MM-DD`.",
                      "type": "text/plain",
                    },
                  "key": "after",
                  "value": "",
                },
              ],
            "variable": [],
          },
        "header": [{ "key": "Accept", "value": "application/json" }],
        "method": "GET",
      },
  }
sidebar_class_name: "get api-method"
info_path: docs/api/marquez
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";

## Query all datasets and jobs

Returns one or more datasets and jobs of your query.

<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"q","in":"query","schema":{"type":"string","example":"my-dataset","description":"Query containing pattern to match; datasets and jobs pattern matching is string based and case-insensitive. Use percent sign (`%`) to match any string of zero or more characters (`my-job%`), or an underscore (`_`) to match a single character (`_job_`)."},"required":true}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"filter","in":"query","schema":{"type":"string","example":"dataset","description":"Filters the results of your query by `dataset` or `job`."},"required":false}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"sort","in":"query","schema":{"type":"string","example":"name","description":"Sorts the results of your query by `name` or `updated_at`."},"required":false}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"limit","in":"query","description":"The number of results to return from offset.","required":false,"schema":{"type":"integer","example":25,"default":100}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"name":"namespace","in":"query","description":"Match jobs or datasets within the given namespace.","required":false,"schema":{"type":"string","maxLength":1024,"example":"my-namespace"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"before":null,"name":"before","in":"query","description":"Match jobs or datasets **before** `YYYY-MM-DD`.","required":false,"schema":{"type":"string","pattern":"YYYY-MM-DD","example":"2022-09-15"}}}></ParamsItem><ParamsItem className={"paramsItem"} param={{"after":null,"name":"after","in":"query","description":"Match jobs or datasets **after** `YYYY-MM-DD`.","required":false,"schema":{"type":"string","pattern":"YYYY-MM-DD","example":"2022-09-15"}}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>

OK

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"totalCount"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"description":"Total number of search results.","type":"integer","example":1}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>results</strong><span style={{"opacity":"0.6"}}> object[]</span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"type"} required={false} schemaName={"SearchResultType"} qualifierMessage={"**Possible values:** [`DATASET`, `JOB`]"} schema={{"type":"string","enum":["DATASET","JOB"],"description":"The type of search result.","example":"DATASET","title":"SearchResultType"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={""} qualifierMessage={undefined} schema={{"type":null,"description":"The name of the dataset or job.","example":"public.delivery_7_days"}}></SchemaItem><SchemaItem collapsible={false} name={"updatedAt"} required={false} schemaName={""} qualifierMessage={undefined} schema={{"type":null,"description":"An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the date/time the dataset or job was updated.","example":"2019-05-09T19:49:24.201361Z"}}></SchemaItem><SchemaItem collapsible={false} name={"namespace"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The namespace of the dataset or job.","example":"food_delivery"}}></SchemaItem><SchemaItem collapsible={false} name={"nodeId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The ID of the node. A node can either be a dataset node or a job node. The format of nodeId for dataset is `dataset:<namespace_of_dataset>:<name_of_the_dataset>` and for job is `job:<namespace_of_the_job>:<name_of_the_job>`.","example":"dataset:food_delivery:public.delivery_7_days"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"totalCount\": 1,\n  \"results\": [\n    {\n      \"type\": \"DATASET\",\n      \"name\": \"public.delivery_7_days\",\n      \"updatedAt\": \"2019-05-09T19:49:24.201361Z\",\n      \"namespace\": \"food_delivery\",\n      \"nodeId\": \"dataset:food_delivery:public.delivery_7_days\"\n    }\n  ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>

